package gui_layer;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import javax.swing.JPanel;

public class ImagePanel extends JPanel
{
	  private BufferedImage image;
	  
	  public ImagePanel()
	  {
		  try
		  {
			  image = ImageIO.read(getClass().getResource("/img/background.jpg"));
		  }
		  catch (Exception e)
		  {
		  }
	  }
	  
	  protected void paintComponent(Graphics temp)
	  {
	    super.paintComponent(temp);
	    try
	    {
	    	temp.drawImage(image, 0, 0, getWidth(), getHeight(), this);
	    }
	    catch(Exception e) 
	    {
	    }
	  }
	}
